package com.codefish.codefishseckill.service;

import com.codefish.codefishseckill.entity.Order;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author codefish
 * @since 2022-07-07
 */
public interface OrderService extends IService<Order> {

    /**
     * 按条件查询所有订单
     *
     * @param userId 用户id，不可为null
     * @param goodsId 订单id，为null时不作为限制查询条件
     * @return 符合查询条件的所有订单信息
     */
    List<Order>  selectOrderByCondition(Long userId, Long goodsId);

    Long getOneByCondition(Long userId, Long goodsId);

    Order getOrderByOrderId(Long orderId);
}
